<?
//Declaration des Classes PHP
    function __autoload($className) {
        $folder=Root::classFolder($className);
        if($folder) require_once($folder.'/'.$className.'.class.php');
    }
    define('ROOT_DIR', dirname(__FILE__).'/');
    include "Class/Root.class.php";$GLOBALS['Systeme']=$Systeme;
//Definition du lien par defaut
echo "<h1>INSTALL LOG</h1>";
echo "<ul>";
$Systeme = new Sys();
//Connexion SQL
echo "<li>CONNEXION SQL</li>";
$Systeme->connectSQL();
//Intialisation des modules
echo "<li>INITIALISATION DES MODULES</li>";
$Systeme->initModules();
//Intialisation des langages
echo "<li>INITILIALISATION DES LANGUES</li>";
$Systeme->initLanguages();
echo "<li>CREATION DES TABLES</li><ul>";
foreach ($Systeme->Modules as $K=>$M){
	echo "<li>CREATION DU MODULE $K</li><ul>";
	$M->loadSchema();
	$M->Db->Check();
	echo "</ul>";
}
echo "</ul>";
echo "<li>CREATION DE L UTILISATEUR ADMIN</li><ul>";
$u = new genericClass("Systeme");
$u->initFromType("User");
$u->Set("Login","Admin");
$u->Set("Mail","Admin@".$_SERVER["SERVER_NAME"]);
echo "<li>Login : Admin</li>";
$u->Set("Pass","secret");
echo "<li>Pass: secret</li>";
$u->Set("Skin","AdminV2");
echo "<li>Skin: AdminV2</li>";
$u->Set("Admin",1);
$u->Set("Domaine",$_SERVER["SERVER_NAME"]);
echo "<li>Domaine: ".$_SERVER["SERVER_NAME"]."</li>";
$u->Save();
echo "</ul>";
echo "<h1>INSTALLATION TERMINE AVEC SUCCES</h1>";

?>
</ul>